package com.yin.listener;

import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

import com.yin.entity.UserEntity;
import com.yin.event.UserRegisterEvent;

/**
*@author LSY
*Time: 2018年12月28日上午10:36:42
*
*
*/
@Component
public class UserRegisterListener implements ApplicationListener<UserRegisterEvent>{

	@Override
	public void onApplicationEvent(UserRegisterEvent event) {
		//获取注册用户对象
		UserEntity userEntity = event.getUserEntity();
		//输出注册用户信息
		System.out.println("ApplicationListener注册信息，用户名："+userEntity.getName()+"，密码："+userEntity.getPassword());
	}

}
